//
//  HXNet.h
//  HXYJ
//
//  Created by sven on 14-12-14.
//  Copyright (c) 2014年 HX. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "EDJHTTPClient.h"

@class HXAnswer;
@class ICCompletePofileInfo;
@class ICProjectSimpleItem;
typedef void (^ RSRequestComplete)(NSInteger code, NSDictionary *info, NSString *message);
@interface ICNet : EDJHttpClient
//+ (ICNet *)shareInstance;
//+ (void)destroy;
- (id)initWithBaseURL:(NSURL *)url;
- (void)getUpdateInfo:(NSString *)currentVersion OnComplete:(RSRequestComplete)block;
//EnjoyFood
//获取验证码
- (void)getVerifycodeWithPhoneNum:(NSString *)phoneNum   OnComplete:(RSRequestComplete)block;

- (void)loginWithPhoneNum:(NSString *)phoneNum  code:(NSString*)code OnComplete:(RSRequestComplete)block;

//向服务器传顾客定位
- (void)sendLocation:(NSString *)location   OnComplete:(RSRequestComplete)block;

//微信用户注册
- (void)registerWX:(NSString *)openid unionid:(NSString*)unionid   OnComplete:(RSRequestComplete)block;

- (void)getHomeInfor:(NSString *)position OnComplete:(RSRequestComplete)block;


//新增收货地址
-(void)addAddressWithParams:(NSDictionary *)parameters OnComplete:(RSRequestComplete)block;

//删除地址
-(void)removeAddressWithId:(NSString*)id OnComplete:(RSRequestComplete)block;

//编辑收货地址
-(void)editAddressWithParams:(NSDictionary *)parameters OnComplete:(RSRequestComplete)block;

//设置默认收货地址
-(void)setDefaultAddress:(NSString*)id  OnComplete:(RSRequestComplete)bloc;

//地址列表
-(void)addressList:(RSRequestComplete)block;

//订单列表   status 0 未付款   1待收货  2已完成   3退换货  4线下购物
-(void)getOrderListWithStatus:(NSString*)status page:(NSString*)page size:(NSString*)size OnComplete:(RSRequestComplete)block;

//申请成为分销
-(void)applyDistributorWithName:(NSString*)name phone:(NSString*)phone reason:(NSString*)reason employee:(NSString*)is_employee OnComplete:(RSRequestComplete)block;

//我的分销
-(void)getDistributorWithPage:(NSString*)page size:(NSString*)size OnComplete:(RSRequestComplete)block;

//我的收藏
-(void)getCollectionGoods:(RSRequestComplete)block;

//添加收藏
-(void)addCollect:(NSString*)productId OnComplete:(RSRequestComplete)block;

//取消收藏
-(void)removeCollect:(NSString*)productId OnComplete:(RSRequestComplete)block;

//优惠券
-(void)getCoupons:(NSString*)page size:(NSString*)size status:(NSString*)status OnComplete:(RSRequestComplete)block;

//订单选择优惠券
-(void)getCouponLists:(NSString*)page size:(NSString*)size totalPrice:(NSString*)totalPrice OnComplete:(RSRequestComplete)block;


//佣金提现记录
-(void)getDrawalListWithPage:(NSString*)page size:(NSString*)size OnComplete:(RSRequestComplete)block;

//申请提现
-(void)getDrawalWithAmount:(NSString*)amount OnComplete:(RSRequestComplete)block;

//商品分类
-(void)getProductCategory:(NSString*)categoryId page:(NSString*)page size:(NSString*)size OnComplete:(RSRequestComplete)block;

//商品详情
-(void)getProductInfoWithId:(NSString*)productId wareHouseId:(NSString*)wareHouseId  OnComplete:(RSRequestComplete)block;

//获取购物车
-(void)getCartListWithIsLocalDelivery:(BOOL)isLocalDelivery whCode:(NSString *)whCode type:(NSInteger)type OnComplete:(RSRequestComplete)block;

//快速支付
- (void)getFastCheckoutProduct:(NSString *)str OnComplete:(RSRequestComplete)block;

//同步购物车
- (void)syncCartList:(NSArray *)listProduct total:(NSNumber *)total type:(NSNumber *)type token:(NSString *)token isLocalDelivery:(BOOL)isLocalDelivery whCode:(NSString *)whCode OnComplete:(RSRequestComplete)block;

//更新购物车
- (void)updateCartList:(NSArray *)listProduct total:(NSNumber *)total type:(NSNumber *)type OnComplete:(RSRequestComplete)block;

//增加购物车
- (void)AddCartId:(NSString *)productId qty:(NSNumber *)qty type:(NSNumber *)type  OnComplete:(RSRequestComplete)block;

//清空购物车
- (void)emptyCart:(NSNumber *)type OnComplete:(RSRequestComplete)block;

//移除不可下单的购物车商品
- (void)removeInvalidGood:(NSNumber *)type productIds:(NSString *)ids OnComplete:(RSRequestComplete)block;

//更改订单地址
-(void)changeOrderAddress:(NSString *)productList   addressId:(NSString*)addressId OnComplete:(RSRequestComplete)block;

//更改优惠券
-(void)changeCoupon:(NSString*)couponid productList:(NSString *)productList addressID:(NSString *)addressId discount:(NSString*)discount type:(NSNumber*)type carrier:(NSNumber*)carrier OnComplete:(RSRequestComplete)block;

//更改使用积分
-(void)changePoints:(NSString*)points productList:(NSString *)productList addressID:(NSString *)addressId couponid:(NSString*)couponid discount:(NSString*)discount  type:(NSNumber*)type carrier:(NSNumber*)carrier OnComplete:(RSRequestComplete)block;


//积分抵扣
-(void)getDiscountPoints:(NSString*)totalAmount couponId:(NSString*)couponId postage:(NSString*)postage  discount:(NSString*)discount  OnComplete:(RSRequestComplete)block;


//点击立即下单后跳转到的页面 需要拉取的信息
- (void)createOrder:(NSString *)productList addressID:(NSString *)addressId position:(NSString*)position type:(NSNumber*)type carrier:(NSNumber*)carrier OnComplete:(RSRequestComplete)block;

//下订单接口 服务器从该接口返回客户端吊起微信接口的信息
- (void)placeOrderProductList:(NSString *)productList addressID:(NSString *)addressId paymentMethod:(NSNumber *)payType
                     couponId:(NSString *)couponId points:(NSString *)points userComment:(NSString *)comments type:(NSNumber*)type carrier:(NSNumber*)carrier OnComplete:(RSRequestComplete)block;
//搜索展示页面
- (void)searchRecentOnComplete:(RSRequestComplete)block;

//搜索结果列表
- (void)searchResultKey:(NSString *)key page:(NSInteger)page orderByPrice:(NSInteger)orderByPrice orderBySellQty:(NSInteger)orderBySellQty category:(NSInteger)category isSale:(NSInteger)isSale OnComplete:(RSRequestComplete)block;

//获取订单信息
- (void)requestOrderInfo:(NSString *)orderNo OnComplete:(RSRequestComplete)block;

//减去购物车中的某个物品
- (void)subCart:(NSString *)productId qty:(NSNumber *)qty type:(NSNumber *)type barcode:(NSString *)barcode OnComplete:(RSRequestComplete)block;

//账户
-(void)myAccount:(RSRequestComplete)block;

//是否已经申请分销
-(void)checkReseller:(RSRequestComplete)block;



//选择退换货列表
-(void)getReturnReason:(NSString*)status OnComplete:(RSRequestComplete)block;

//选择退换货列表
-(void)getReturnProducts:(NSString*)orderNo OnComplete:(RSRequestComplete)block;

//申请退换货
-(void)requestReturn:(NSString*)body OnComplete:(RSRequestComplete)block;

//申请退换货
-(void)getRetrunRecord:(NSString*)orderId OnComplete:(RSRequestComplete)block;

//活动专题列表
- (void)getActivityList:(NSNumber *)eventId position:(NSString *)position page:(NSNumber *)page size:(NSNumber *)size OnComplete:(RSRequestComplete)block;

//秒杀列表
- (void)getSaleList:(NSNumber *)eventId position:(NSString *)position page:(NSNumber *)page size:(NSNumber *)size OnComplete:(RSRequestComplete)block; 
- (void)getSaleList:(NSNumber *)eventId position:(NSString *)position page:(NSNumber *)page size:(NSNumber *)size OnComplete:(RSRequestComplete)block;

//退换货申请详情
- (void)getReturnInfor:(NSString *)returnId OnComplete:(RSRequestComplete)block;

//再来一单
- (void)orderAgainWithOrderNO:(NSString *)orderNo OnComplete:(RSRequestComplete)block;
//立即支付
- (void)payNowWithOrderNO:(NSString *)orderNo OnComplete:(RSRequestComplete)block;
//拉取分享信息接口
- (void)getShareInfoWithProductId:(NSString *)productId OnComplete:(RSRequestComplete)block;

//保存退换货信息
- (void)saveInfoTrackingNo:(NSString *)trackingNo returnId:(NSString *)id carrier:(NSString *)carrier OnComplete:(RSRequestComplete)block;

//取消退换货
- (void)cancelReturn:(NSString *)returnId OnComplete:(RSRequestComplete)block;

//删除订单
-(void)removeOrder:(NSString*)orderId OnComplete:(RSRequestComplete)block;
//取消订单
- (void)cancelOrder:(NSString *)orderId OnComplete:(RSRequestComplete)block;

//保存个推信息
- (void)saveGeTuiInfoPhone:(NSString *)phone openid:(NSString *)openid clientId:(NSString *)clientId OnComplete:(RSRequestComplete)block;

@end










